package com.konne.nightmare.FastPublicOpinion.ui.information.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.konne.nightmare.FastPublicOpinion.R;
import com.konne.nightmare.FastPublicOpinion.base.BaseMvpActivity;
import com.konne.nightmare.FastPublicOpinion.base.BaseMvpPresenter;
import com.konne.nightmare.FastPublicOpinion.ui.information.adapter.ClassMoveAdapter;
import com.konne.nightmare.FastPublicOpinion.ui.personal.activity.DeviceInfoActivity;
import com.konne.nightmare.FastPublicOpinion.ui.personal.activity.DeviceManageActivity;
import com.konne.nightmare.FastPublicOpinion.ui.personal.adapter.DeviceAdapter;
import com.konne.nightmare.FastPublicOpinion.utils.DeviceUtil;
import com.konne.nightmare.FastPublicOpinion.utils.LoadProgressDialog;
import com.konne.nightmare.FastPublicOpinion.widget.DividerItemDecoration;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * @Author: chen
 * @UpdateDate: 1/27/22
 * @UpdateRemark:
 */
public class MoveClassActivity extends BaseMvpActivity implements View.OnClickListener{

    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.img_back)
    ImageView imgBack;
    @BindView(R.id.rcl_list)
    RecyclerView rclList;
    List<String> list = new ArrayList<>();
    private ClassMoveAdapter classMoveAdapter;
    @Override
    protected BaseMvpPresenter createPresenter() {
        return new BaseMvpPresenter();
    }

    @Override
    public int getLayout() {
        return R.layout.activity_move_class;
    }

    @Override
    public void initView() {
        initImmersionBar(R.color.white,true);
        tvTitle.setText("选择章节");
        list.add("1");
        list.add("2");

        classMoveAdapter = new ClassMoveAdapter(R.layout.item_move_class,list);
        DividerItemDecoration decoration = new DividerItemDecoration(this,
                DividerItemDecoration.VERTICAL_LIST);
        decoration.setDividerHeight(DeviceUtil.dip2px(this, 10));
        rclList.addItemDecoration(decoration);
        rclList.setLayoutManager(new LinearLayoutManager(this));
        rclList.setAdapter(classMoveAdapter);


    }

    @Override
    public void initData(Bundle savedInstanceState) {

    }
    @OnClick({R.id.img_back,R.id.tv_cancel})
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.img_back:
            case R.id.tv_cancel:
                finish();
                break;


        }
    }
    @Override
    public LoadProgressDialog getLoadDialog() {
        return dialog;
    }

    @Override
    public void cancelLoadDialog() {
        if (dialog != null && dialog.isShowing()) {
            dialog.cancel();
        }
    }
}
